<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0"
	name="viewport">
<meta content="telephone=no" name="format-detection">
<title>接口测试</title>
</head>
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type='text/javascript'>
	function execute() {

		$.ajax({
			type : "post",
			contentType : 'application/json',
			url : $("#url").val(),
			data : $("#req").val(),
			datatype : "json",
			error : function() {
				$("#res").val("Request Failure!");
			},
			success : function(data) {

				$("#res").val(JSON.stringify(data));
			}
		});
	}
</script>

<body>
	-----url:
	<input type="text" id="url" value="/grow-web/user/login.json" placeholder="请求链接"	style="width: 602px" />
	<input type="button" value="测试" onclick="execute()" />
	<br/> -request:
	<textarea id="req" style="height: 400px; width: 600px">
{
	"requestObject":
	{
		"name":"corp01",
		"password":"123456"
	}
}
	</textarea>
	<br/> response:
	<textarea id="res" style="height: 400px; width: 600px">
	</textarea>
</body>
</html>